package com.liu.efk.controller;


import com.liu.efk.domain.Drole;
import com.liu.efk.domain.ResultVo;
import com.liu.efk.service.IRoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/role")
@CrossOrigin
@Api(tags = "角色管理接口")
public class RoleController {

    @Autowired
    IRoleService roleService;



    @GetMapping("/list")
    @ApiOperation("查询所有的角色")
    public ResultVo getList(){

        List<Drole> list = roleService.list();

         return  ResultVo.success("返回所有的角色集合",list);
    }






}
